package com.dragon.concurrent.demo.waitnotify;

import java.util.Collection;

public interface Lock {

    class TimeOutException extends Exception {
        private String message;

        public TimeOutException(String message) {
            super(message);
        }
    }

    void lock() throws InterruptedException;

    void lock(long mills) throws InterruptedException, TimeOutException;

    void unlock();

    Collection<Thread> getBlockThreads();

    int getBlockSize();
}
